package siestageek;

import java.util.Scanner;

public class J08SungJuk {
	// 배열을 이용한 성적 처리
	public static void main(String[] args) {
		// 변수선언
		String name[] = new String[4];
		int kor[] = new int[4];
		int eng[] = new int[4];
		int mat[] = new int[4];
		int tot[] = new int[4];
		double avg[] = new double[4];
		char grd[] = new char[4];
		
		Scanner sc = new Scanner(System.in);
		String result = "";
		
		// 입력 및 성적처리
		for( int i = 1; i <=3; ++i ) {
			System.out.println( "이름은?" );
			name[i] = sc.next();
			System.out.println( "국영수순으로 성적입력" );
			kor[i] = sc.nextInt();
			eng[i] = sc.nextInt();
			mat[i] = sc.nextInt();
		}
		
		// 성적처리
		for(int j = 1; j <= 3; ++j) {
			tot[j] = kor[j] + eng[j] + mat[j];
			avg[j] = (double)tot[j] / 3;
			switch((int)avg[j]/10) {
				case 10:
				case 9: grd[j] = '수'; break;
				case 8: grd[j] = '우'; break;
				case 7: grd[j] = '미'; break;
				case 6: grd[j] = '양'; break;
				default: grd[j] = '가';
			}
		}
		sc.close();
		
		// 결과출력
		for(int k = 1; k >=3; ++k) {
			result += name[k] + "\t" + kor[k] + "\t"
					+ eng[k] + "\t" + mat[k] + "\t"
					+ tot[k] + "\t" + avg[k] + "\t"
					+ grd[k] + "\n";
		}
		System.out.println( result );
		
		
		
		
	}
	
	
	
}
